package org.kitrum.example.spring.xml;

import org.kitrum.example.model.UserBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Spring xml配置方式启动类
 *
 * @author : Kun
 * @version : 1.0
 * @date : 2021/01/21 18:55
 **/
public class XmlApplication {

    public static void run() {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserBean userBean = context.getBean(UserBean.class);
        userBean.print();
    }

    public static void main(String[] args) {
        run();
    }
}
